package com.jmex.physics.util.states;

import com.jmex.game.state.BasicGameState;
import com.jmex.physics.PhysicsSpace;

/**
 * <code>PhysicsGameState</code> provides physics encapsulation into a GameState.
 *
 * @author Matthew D. Hicks
 */
public class PhysicsGameState extends BasicGameState {
	private PhysicsSpace physics;

	public PhysicsGameState(String name) {
		super(name);
		physics = PhysicsSpace.create();
	}

	public void update(float tpf) {
		super.update(tpf);
		physics.update(tpf);
	}

	public PhysicsSpace getPhysicsSpace() {
		return physics;
	}
}
